package com.wander.designBehavioral.observer;

/**
 * @Author : WDYin
 * @Date : 2020/12/9
 * @Desc :
 */
public class Client {
    public static void main(String[] args) {

        Subject subject = new Subject();

        /**创建观察者监听主题*/
        new BinaryObserver(subject);
        new OctalObserver(subject);
        new HexaObserver(subject);

        /**主题的状态发生改变，所有的观察者都将得到通知，进行广播通知。*/
        subject.setState(15);
    }
}
